home *** CD-ROM | disk | FTP | other *** search
/ Interactive CD-ROM & Web Magazine 6 / Interactive CD-ROM & Web Magazine 6.iso / pc / imm / db / db.dir / 00046.ls < prev    next >
Encoding:
Text File  |  1996-04-05  |  2.8 KB  |  93 lines

  1. global pathSeparator, cd, iswin95, hd
  2.  
  3. on FullPath relativePath
  4.   if relativePath = EMPTY then
  5.     return EMPTY
  6.   end if
  7.   return cd & pathSeparator & relativePath
  8. end
  9.  
  10. on UserCPU
  11.   if the machineType = 256 then
  12.     return "Intel"
  13.   end if
  14.   return "Motorola"
  15. end
  16.  
  17. on GiftCPU OpSys
  18.   if (OpSys = "DOS") or (OpSys = "Win95") or (OpSys = "Win95") or (OpSys = "Win31") then
  19.     return "Intel"
  20.   end if
  21.   return "Motorola"
  22. end
  23.  
  24. on Installable giftOS
  25.   return GiftCPU(giftOS) = UserCPU()
  26. end
  27.  
  28. on UserWarn giftOS
  29.   if the machineType = 256 then
  30.     if (giftOS = "Win31") and iswin95 then
  31.       alert("Questo gift ├¿ per Windows 3.1 e potrebbe non funzionare correttamente nel tuo computer.")
  32.     else
  33.       if (giftOS = "Win95") and not iswin95 then
  34.         alert("Questo gift ├¿ per Windows '95 e potrebbe non funzionare correttamente nel tuo computer.")
  35.       end if
  36.     end if
  37.   end if
  38. end
  39.  
  40. on CreateBatch unzipPath, giftPath, hdEntryPath, installDir, giftDir
  41.   set CRLF to numToChar(13) & numToChar(10)
  42.   set theBatch to "mkdir " & hdEntryPath & installDir & CRLF
  43.   set theBatch to theBatch & "mkdir " & hdEntryPath & installDir & "\" & giftDir & CRLF
  44.   set theBatch to theBatch & unzipPath & " "
  45.   set theBatch to theBatch & giftPath & " "
  46.   set theBatch to theBatch & hdEntryPath & installDir & "\" & giftDir
  47.   set theBatch to theBatch & " -de" & CRLF
  48.   return theBatch
  49. end
  50.  
  51. on Install giftInstallationType, giftPath
  52.   if the machineType = 256 then
  53.     set dirDef to "directory"
  54.   else
  55.     set dirDef to "cartella"
  56.   end if
  57.   if giftInstallationType = "I" then
  58.     if offset("FR_sbs", giftPath) > 0 then
  59.       InstallFreddie()
  60.       return 
  61.     end if
  62.     open(giftPath)
  63.   else
  64.     if giftInstallationType = "CP" then
  65.       alert("Per installare questo gift copia la " & dirDef & giftPath & " sul tuo hard disk.")
  66.     else
  67.       if giftInstallationType = "SCR" then
  68.         alert("Questo ├¿ uno Screen Saver: copialo nella directory Windows per renderlo utilizzabile.")
  69.       else
  70.         if giftInstallationType = "SE" then
  71.           set installedPath to char 12 to length(giftPath) of giftPath
  72.           set theBatch to CreateBatch(hd & "helper\pkunzip.exe", giftPath & "\Install.zip", hd, "install", installedPath)
  73.           set batchFile to FileIO(mnew, "write", hd & "helper\install.bat")
  74.           put hd & "helper\install.bat"
  75.           batchFile(mWriteString, theBatch)
  76.           batchFile(mdispose)
  77.           open(hd & "helper\install.bat")
  78.           alert("Il gift sar├á installato in " & hd & "install\" & installedPath)
  79.         end if
  80.       end if
  81.     end if
  82.   end if
  83. end
  84.  
  85. on InstallFreddie
  86.   set theBatch to cd & "\FR_sbs\Tbook.exe " & cd & "\FR_sbs\Install.Mmw"
  87.   set batchFile to FileIO(mnew, "write", hd & "helper\install.bat")
  88.   put hd & "helper\install.bat"
  89.   batchFile(mWriteString, theBatch)
  90.   batchFile(mdispose)
  91.   open(hd & "helper\install.bat")
  92. end
  93.